<template>
    <div>
      <web-header v-if="sellerDate.supports"  :seller="sellerDate" ></web-header>
      <web-nav></web-nav>
    </div>
</template>
<script>
/* eslint-disable no-new */
  import WebHeader from './../components/header/header'
  import WebRating from './../components/ratings/ratings'
  import WebNav from './../components/nav/nav'
  import axios from '../common/js/axiosData'
  const ERROR_OK = 0
    export default {
        name: 'index',
      components: {
        WebHeader,
        WebNav,
        WebRating
      },
      data () {
          return {
            sellerDate: {}
          }
      },
      created () {
          this.getData()
      },
      methods: {
          // 获取数据
        getData () {
          axios.get('/api/seller').then(res => {
              if (res.error === ERROR_OK) {
                this.sellerDate = res.data
              }
          })
        }
      }
    }
</script>

<style scoped>

</style>
